package org.shoukaiseki.randomtoolsweb.data;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
public class RandomDataController {


    @Autowired
    UserService userService;


    @RequestMapping("/data")
    @ResponseBody
    public String randomData(){

       long startTime=System.currentTimeMillis();
        int re = userService.saveRandom(10000*10000);
        long endTime=System.currentTimeMillis();

       long t=endTime-startTime;


        return "更新花费"+t+"毫秒";
    }

}
